

$(function(){
	if(sessionStorage.getItem("xpxd")!=null && sessionStorage.getItem("xpxd")!=""){
		$("#xiugaimima").html("");
		  var xin='<div class="mid-width" onclick="xinmima()">'+
    '<input type="button" class="p_button" value="新密码保存">'+
     '</div>';
		$("#xiugaimima").html(xin);
		
	}
})







 ///修改密码
function  xiayibu(){
   var str= $("#pwd-input").val().trim();
   if(str.length==6){
  	 $.ajax({
		url: urlcore + "/api/user/paymentpassword?userId="+uuuuid,
		type: "post",
		contentType: "application/json;charset=utf-8",
		data: JSON.stringify({
			paypwd:str
		}),
		dataType: "json",
		success: function(data) {
			if(data.success == true) {
			   //alert("修改成功");
			   window.location.href="../index.html";
            }
		},
		error: function() {
			alert("error");
		}
	});
	
   	
   	
   }else{
   	alert("支付长度有误");
   }

}

    /*    var id = getvl("id");
  function xiayibu(){
	var password1=$("#password1").val();
	var password2=$("#password2").val();
	var password3=$("#password3").val();
	var password4=$("#password4").val();
	var password5=$("#password5").val();
	var password6=$("#password6").val();
	if(password1!=''&&password2!=''&&password3!=''&&password4!=''password5!=''&&password6!=''){
		var paypwds=password1+password2+password3+password4+password5+password6;
    	 $.ajax({
		url: urlcore + "/api/user/paymentpassword?types=1&id="+id,
		type: "post",
		contentType: "application/json;charset=utf-8",
		data: JSON.stringify({
			paypwd:paypwds
		}),
		dataType: "json",
		success: function(data) {
			if(data.success == true) {
			     alert("设置成功!!!");
				window.location.href = "12.7.3shezhi_mima_queren.html";
            }
		},
		error: function() {
			alert("error");
		}
	});
	}else{
		
		alert("设置支付密码有误");
		
	     return;	
	}
	
}
*/